package org.jeecg.modules.pipe.entity;

import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 流量设备漏损记录
 * @Author: jeecg-boot
 * @Date:   2024-07-16
 * @Version: V1.0
 */
@Data
@TableName("iot_pipe_flow_leakage")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="iot_pipe_flow_leakage对象", description="流量设备漏损记录")
public class PipeFlowLeakage implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
	/**管段*/
	@Excel(name = "管段", width = 15)
    @ApiModelProperty(value = "管段")
    private String pipeId;
	/**上级管段*/
	@Excel(name = "上级管段", width = 15)
    @ApiModelProperty(value = "上级管段")
    private String pid;
	/**管段名称*/
	@Excel(name = "管段名称", width = 15)
    @ApiModelProperty(value = "管段名称")
    private String pipeName;
	/**监测点*/
	@Excel(name = "监测点", width = 15)
    @ApiModelProperty(value = "监测点")
    private String pointId;
	/**监测点名称*/
	@Excel(name = "监测点名称", width = 15)
    @ApiModelProperty(value = "监测点名称")
    private String pointName;
	/**设备类型*/
	@Excel(name = "设备类型", width = 15, dicCode = "read_drive_type")
	@Dict(dicCode = "read_drive_type")
    @ApiModelProperty(value = "设备类型")
    private String deviceType;
	/**设备序列号*/
	@Excel(name = "设备序列号", width = 15)
    @ApiModelProperty(value = "设备序列号")
    private String deviceId;
	/**设备名称*/
	@Excel(name = "设备名称", width = 15)
    @ApiModelProperty(value = "设备名称")
    private String deviceName;
	/**设备数据*/
	@Excel(name = "设备数据", width = 15)
    @ApiModelProperty(value = "设备数据")
    private String readData;
	/**下级设备数据和*/
	@Excel(name = "下级设备数据和", width = 15)
    @ApiModelProperty(value = "下级设备数据和")
    private BigDecimal nextSumData;
    // 下级设备数据和-节点id-有业务数据的子节点集，逗号分割
    private String childrenNode;

	/**设备单位*/
	@Excel(name = "设备单位", width = 15)
    @ApiModelProperty(value = "设备单位")
    private String unitName;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
	/**租户*/
	@Excel(name = "租户", width = 15)
    @ApiModelProperty(value = "租户")
    private String tenantId;

    /**是否业务设备：流量时，当前管段是否有监测点的流量设备 */
    private transient Boolean isBisDev;

    private transient String startTime;
    private transient String endTime;
    // 子集
    private transient List<PipeFlowLeakage> children;

}
